﻿/**
 * 给定数组A，找出一个连续段，使得奇偶位置和恰好相等
 * 直接用前缀和即可，只要有重复的数出现即可
 */
#include <bits/stdc++.h>
using namespace std;

#include <bits/extc++.h>
using namespace __gnu_pbds;

using llt = long long;

int N;
vector<llt> A, B;
set<llt> SS;

bool proc(){
    llt tmp = 0;
    SS.clear(); SS.insert(0);
    for(int i=1;i<=N;i+=2){
        auto it = SS.find(tmp -= A[i]);
        if(it != SS.end()) return true;
        SS.insert(tmp);
        if(i + 1 <= N){
            it = SS.find(tmp += A[i + 1]);
            if(it != SS.end()) return true;
            SS.insert(tmp);
        }
    }   
    return false;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(0);
    int nofkase = 1;
    const array<string, 3> t {"ABC", "CAB", "BCA"};
    cin >> nofkase;
    while(nofkase--){
        cin >> N;
        A.assign(N + 2, 0);
        for(int i=1;i<=N;++i) cin >> A[i];
        cout << (proc() ? "YES\n" : "NO\n");
    }
    return 0;
}